﻿using HemasHospitals.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Popups;
using Windows.UI.Xaml.Controls;

namespace HemasHospitals.Controllers
{
    public static class Common
    {
        public static string hospitalName = "Hemas hospitals";

        public static async void LogoutCommon(Frame frame)
        {
            var msg = new MessageDialog("Are you sure you want to logoff?", hospitalName);
            msg.Commands.Add(new UICommand("Yes", (UICommandInvokedHandler) =>
            {
                frame.Navigate(typeof(LoginScreen));
            }));
            msg.Commands.Add(new UICommand("No"));
            await msg.ShowAsync();
        }


    }
}
